6.6410 and 210 key interrupt programmingThe first is to open the 6410 floor schematic:You can see that the OK6410 has six keys:You can see that the pins for the OK6410 six keys are KEYINT1, KEYINT2, KEYINT3, KEYINT4, KEYINT5, and KEYINT6. Then search for the word in the schematic of the core board:You can see that the key interrupt is interoperable with the pin of the GPN series register, followed by the information on the GPN series registers in the
in-memory data table
Code implementation: (By default, the first row is set to the title, the table content is calculated from the second row)The extension is XLS error, xlsx will not error string str_filename = @ "D:\01-Working\ integrated business platform data \ Buoy \fb.xls"; string Strcon = String.Format (" Provider=microsoft.ace.oledb.12.0;data source={0}; Extended properties= ' Excel 12.0; Hdr=yes;imex=0 ' ", str_filename);//New ConnectionOleDbConnection myconn = new OleDbConnect
Topic Link: Click to open the linkIdea: Because each of the matching points on the left has a priority, we sort by the priority of the points on the left, so that the previous points are prioritized. The reason is simple, we just need to know how the Hungarian algorithm is done: We enumerate each left point in turn, for a left point x, find a right point y, if y is not matched, then (x, y) is a pair of new matches, if Y has matched X ', then we try to find a horse for X ' Matching points, if fou
course Schedule, the point of 0 is constantly removed, which is the next elective course.classSolution { Public: Vectorint> FindOrder (intNumcourses, vectorint,int>>Prerequisites) {Vectorint>order; Vectorint> Outd (numcourses,0); VectorBOOL> del (numcourses,false); Unordered_mapint, vectorint> >graph; //Construct Reverse Neighborhood graph//graph is to decrease the out-degree of a set of vertices,//When a certain vertice is deleted for(inti =0; I ) {Outd[prerequisites[i].first]++;
SGU 210 Acdream 1227 Beloved Sons KM, sguacdream
Question link: Click the open link
Question:
Given n people
Point permissions of each person
The n rows below indicate the numbers that individuals can obtain (numbers are from 1 to n and cannot be allocated repeatedly)
If this person gets a number, you can get his/her weight.
You can obtain the maximum value and weight.
Q:
Output the number that each person should obtain. If no number is obtained, 0 is
Question Link
Question:N and K represent n vertices. Each vertex has a value. Note: c = max (ABS (N [I]-N [I + 1]). it is required that at most K element values in the array be changed (to any value), and the minimum value of C is obtained.
Analysis:You can divide the value of C into two parts to determine whether the current array can change the number of K to cut the number of C less than two points. DP and DP [I] can be used to determine the number of numbers that need to be
appearance of the lock and unlock statements, this sequence may change. Lock applies for exclusive access to all variables. Lock and unlock always appear in pairs and are not nested. The lock is always in front of the unlock. After a program successfully executes the lock command, once other programs attempt to execute the lock command, they will immediately be placed at the end of a so-called blocking Queue (a waste of resources will be wasted if no quota is used up ), after the UNLOCK Command
I. Classes and modules1. The implementation of the class is based on the prototype inheritance mechanism.Two. Classes and prototypesThree. Classes and constructors1. The constructor is used to initialize the newly created object.2. Use new, so the constructor simply initializes the object state.3. Building a constructor is defining the class, so the first letter is capitalized .4.Four. Identification of constructors and classesFive. Constrctor Properties1. The value of the constructor property i
and Leetcode 207. Course Schedule (Topological ordering-finding the presence of loops in a graph) is similar.Notice that the parallel or self-loops that may appear in the input are p:prerequistites in the for (auto).Code:Class solution {public:vector Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. Leetcode 210. Course Schedule II (topological sequencing-finding the presence of loops in a grap
edges pointing to it are positive numbers (that is, greater than 0), This vertex is called a "consumable vertex ".Synchrograph operations are performed in one round. In each round, the operator selects a "consumable point" randomly for "Burning ".The so-called combustion is: all the arc weights pointing to this point are reduced by 1, and all the arcs from this point are added by 1. After each round, the "consumable point" is updated based on the new arc weight, and the next round is continued.
added to the first of the ready queue if(!blockq.empty ()) {intPid2 = Blockq.front (); Blockq.pop (); Readyq.push_front (PID2); } Q-= times[3]; Break; }//End Case ' d ': {return; } }//Find the next instruction in the processid[pid]++; }//Add the process to the execution queue at the endReadyq.push_back (PID);}intMain () {//T Group use cases intTscanf("%d", t); while(t--) {scanf("%d%d%d%d%d%d%d\n", n, times[0], times[1], time
point of 0), if all the points can be traversed, the condition is satisfied//An auxiliary array is required, the subscript of the array represents the course number, and the value of the array represents the degree//The queue holds a point with a degree of 0, and each time a count is added to the inside, the result is saved to the list each time it pops out of the queue. Final reverse output result int[]flag=New int[numcourses]; int[] res=New int[numcourses]; ListNewArraylist(); for(int
LeetCode 210. Course Schedule II (topological sorting-determining whether a ring exists in a directed graph)
Similar to LeetCode 207. Course Schedule (topological sorting-finding whether a ring exists in a directed graph.
Note that in for (auto p: prerequistites), the possible parallel edge or self-ring in the input is determined.
Code:
class Solution {public: vector
findOrder(int numCourses, vector
> prerequisites) { // [0, {1
point with an entry level of 0 each time, save the point with a list for each deletion (the point with a degree of 0), because I put the pre-order course in front of it, so I finally need to reverse the list and save it to the array output. The general and 200 questions are similar. Code: Public classSolution { Public int[] FindOrder (intNumcourses,int[] Prerequisites) { int[] map=New int[numcourses]; for(inti=0;i//calculate the penetration of each pointmap[prerequisites[i][0]]++; } Que
NOTE: Mobile QQ must be updated to 2015 of the 5.7 latest version
1, if you want to make a group call, you must first have a discussion group. Discussion group in mobile phone QQ home Page-group-Discussion group options, click to select the discussion group you need to.
2, after opening the discussion Group chat page, click the "Phone" button at the top right of the page, then the pop-up menu
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.